package com.czkt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.czkt.pojo.Order;
import org.apache.ibatis.annotations.*;

@Mapper
public interface OrderMapper extends BaseMapper<Order> {
    @Update("update `order` set order_num = order_num-1 where order_id = #{orderId};")
    Boolean updateOrder(@Param("orderId") Integer orderId);

    @Select("select order_num from `order` where order_id = #{orderId};")
    Integer selectOrder(@Param("orderId") Integer orderId);
}
